Skip to content

feat(bindings): deprecate & alias Connection::wipe - #6033

Open
jmayclin wants to merge 2 commits into
aws:mainfrom
jmayclin:2026-08-10-wipe-remove
Open

feat(bindings): deprecate & alias Connection::wipe#6033
jmayclin wants to merge 2 commits into
aws:mainfrom
jmayclin:2026-08-10-wipe-remove

Conversation

@jmayclin

@jmayclin jmayclin commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Goal

Remove any usage of s2n_connection_wipe from the rust bindings.

Why

It is a scary method. An s2n_connection has nearly 125 distinct members, and connection wipe will nuke some of them. This results in a state space explosion that is difficult to reason about, and makes that code path much more bug-prone.

It's performance benefit is insufficient to justify it's scariness.

Connection Creation/connection reuse
                        time:   [934.37 ns 934.55 ns 934.73 ns]
Connection Creation/connection allocation
                        time:   [4.2978 µs 4.2997 µs 4.3017 µs]

This is less than 1% the cost of a handshake.

How

For the rust bindings, we can remove this usage without it being a breaking change. Specifically, we can alias it to actually just call Connection::new

Testing

I previously added behavior tests in #6029. These all still pass.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@github-actions github-actions Bot added the s2n-core team label Aug 11, 2026
@jmayclin jmayclin changed the title feat(bindings) deprecate & alias Connection::wipe feat(bindings): deprecate & alias Connection::wipe Aug 11, 2026
@jmayclin
jmayclin requested review from jouho and maddeleine August 14, 2026 17:42
Comment thread bindings/rust/standard/benchmarks/benches/connection_creation.rs
Comment thread bindings/rust/extended/s2n-tls/src/connection.rs Outdated
@jmayclin
jmayclin requested a review from jouho August 21, 2026 00:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants